package com.avcdata.aoscustommade.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.avcdata.aoscustommade.R;
import com.avcdata.aoscustommade.main.BaseFragment;
import com.avcdata.avcchart.linechart.chart.AvcLineCharts;

/**
 * 城市信息列表第一页
 */
public class SelectCityOne_fragment extends BaseFragment {


    private View v;
    private ListView listview;
    private View headView;

    private TextView module_name;
    private TextView module_type;
    private ImageView module_arrows;
    private LinearLayout trendtip_lay;
    private AvcLineCharts linechart_view;
    private TextView trendtip_text;



    private LinearLayout jiazai_layout;
    private LinearLayout load_fail_layout;
    private Button load_fail_button;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        if (v == null) {
            v = inflater.inflate(R.layout.fragment_selectcity, container, false);
            initView();
        }

        initListener();
        ViewGroup parent = (ViewGroup) v.getParent();
        if (parent != null) {
            parent.removeView(v);
        }

        return v;
    }


    @Override
    protected void lazyload() {

    }


    private void initView() {
        listview = (ListView) v.findViewById(R.id.listview);

        jiazai_layout = (LinearLayout) v.findViewById(R.id.jiazai_layout);
        load_fail_layout = (LinearLayout) v.findViewById(R.id.load_fail_layout);
        load_fail_button = (Button) v.findViewById(R.id.load_fail_button);



        headView = LayoutInflater.from(getActivity()).inflate(R.layout.head_linetrend, null);
        listview.addHeaderView(headView);

        module_name = (TextView) headView.findViewById(R.id.module_name);
        module_type = (TextView) headView.findViewById(R.id.module_type);
        module_arrows = (ImageView) headView.findViewById(R.id.module_arrows);
//        trendtip_lay = (LinearLayout) headView.findViewById(R.id.trendtip_lay);
        linechart_view = (AvcLineCharts) headView.findViewById(R.id.linechart_view);
        trendtip_text = (TextView) headView.findViewById(R.id.trendtip_text);



    }

    private void initListener() {


    }






}
